﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Result" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

        <asp:TextBox ID="SearchInput" runat="server" Style="width: 16%">
        </asp:TextBox><asp:Button ID="SearchButton" runat="server" Text="Search" OnClick="SearchButton_Click" />
        <asp:SqlDataSource ID="Source" runat="server" ConnectionString="<%$ ConnectionStrings:ConStrDinTren %>"
            SelectCommand="SELECT [Titlu], [Link], [Index], [Descriere] FROM [Bookmark] WHERE ([Titlu] LIKE '%' + @Taguri + '%') OR ([Taguri] LIKE '%' + @Taguri + '%') OR ([Link] LIKE '%' + @Taguri + '%') OR ([Descriere] LIKE '%' + @Taguri + '%')">
            <SelectParameters>
                <asp:ControlParameter ControlID="SearchInput" DefaultValue="." Name="Taguri"
                    PropertyName="Text" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:Repeater ID="listare_list" runat="server" DataSourceID="Source">
        <HeaderTemplate>
            <ul>
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <div id="T1"><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Link", "Http://{0}") %>'>
                <%# Eval("Titlu")%></asp:HyperLink></div>
                <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("Index", "~/LinqDetailedBookmark.aspx?id={0}") %>'>
                        More Details 
                </asp:HyperLink>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ul>
        </FooterTemplate>
    </asp:Repeater>
</asp:Content>

